package demo.hms.dashboard.contoller;

import demo.hms.dashboard.service.DashboarService;
import demo.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/dashboard")
public class DashboardController {
    @Resource
    private DashboarService service;

    @RequestMapping(value = "/selectRoomNumber",method = RequestMethod.GET)
    public Result selectRoomNumber(){
        return service.selectRoomNumber();
    }
    @RequestMapping(value = "/selectLiveNumber",method = RequestMethod.GET)
    public Result selectLiveNumber(){
        return service.selectLiveNumber();
    }
    @RequestMapping(value = "/selectRevenue",method = RequestMethod.GET)
    public Result selectRevenue(String month){
        return service.selectRevenue(month);
    }
    @RequestMapping(value = "/selectRevenueByMonth",method = RequestMethod.GET)
    public Result selectRevenueByMonth(String month){
        return service.selectRevenueByMonth(month);
    }
}
